using System;
using DotNetNuke;
using System.Data;
using System.Collections.Generic;

using DotNetNuke.Framework;
using CodexOmega.Modules.VideoLinker;

namespace CodexOmega.Modules.VideoLinker
{
    /// -----------------------------------------------------------------------------
    /// <summary>
    /// An abstract class that provides the DAL contract
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public abstract class DataProvider
    {

        #region Shared/Static Methods

        // singleton reference to the instantiated object 
        static DataProvider objProvider = null;

        // constructor
        static DataProvider()
        {
            CreateProvider();
        }

        // dynamically create provider
        private static void CreateProvider()
        {
            objProvider = (DataProvider)Reflection.CreateObject("data", "CodexOmega.Modules.VideoLinker", "");
        }

        // return the provider
        public static DataProvider Instance()
        {
            return objProvider;
        }

        #endregion

        #region Abstract methods

        public abstract int CreateVideoLink(VideoLinkerInfo videoLinkerInfo);
        public abstract VideoLinkerInfo GetVideoLink(int videoID);
        public abstract List<VideoLinkerInfo> GetVideoLinksList(int typeID, int categoryID, string keyword);
        public abstract bool UpdateVideoLink(VideoLinkerInfo videoLinkerInfo);
        public abstract bool DeleteVideoLink(int videoID);
        public abstract Dictionary<string, int> GetVideoCategoriesList();
        public abstract Dictionary<string, int> GetVideoTypesList();
        public abstract string GetVideoCategory(int categoryID);
        public abstract string GetVideoType(int typeID);
        public abstract int CreateVideoCategory(string definition);
        public abstract int CreateVideoType(string defintion);
        public abstract bool UpdateVideoCategory(int categoryID, string definition);
        public abstract bool UpdateVideoType(int typeID, string definition);
        public abstract bool DeleteVideoCategory(int categoryID);
        public abstract bool DeleteVideoType(int typeID);

        #endregion

    }
}
